package demo1;

public class Mss {
    public static void main(String[] args) {
        Vehicle[] vehicles=new Vehicle[3];
        vehicles[0]=new Car("宝马", "X5");
        vehicles[1]=new Car("奔驰","C级");
        vehicles[2]=new Car("美利达","挑战者300");
        for (Vehicle vehicle:vehicles){
            vehicle.drive();
        }
    }
}
